Finding and Replacing in Scripts and Functions

Description

The Edit > Find , Edit > Find and Replace , and Edit > Goto features let you search an entire script or just selected text. You can search forward or backward, for whole words, and with case sensitivity.

Finding Text

  1. When you have a script or function open in the Xbasic Editor, click Edit > Find or to display the Find dialog.

  2. Enter the search string into the Find what? field.

  3. Optionally, check Whole words? to limit your search to whole words.

  4. Optionally, check Match case? to make your search case sensitive.

  5. Optionally, check Search backwards? The default is to search forward from the cursor position.

  6. Optionally, click Find Next.

  7. Optionally, click Global Search to display the Global Search of Scripts and Functions dialog.

Replacing Text

  1. When you have a script or function open in the Xbasic Editor, click Edit > Find and Replace or to display the Replace dialog.

  2. Enter the search string into the Find what? field.

  3. Enter the replacement string into the Replace with? field.

  4. Optionally, check Whole words? to limit your search to whole words.

  5. Optionally, check Match case? to make your search case sensitive.

  6. Optionally, check Search backwards? The default is to search forward from the cursor position.

  7. Optionally, click Find Next to move to the next occurrence of the search string.

  8. Optionally, click Replace to replace the currently selected occurrence of the search string.

  9. Optionally, click Replace Next to replace the currently selected occurrence of the search string and move to the next occurrence of the search string.

  10. Optionally, click Replace All to replace all occurrences of the search string.

Going to Text

  1. When you have a script or function open in the Xbasic Editor, click Edit > Goto or to display the Goto dialog.

  2. Optionally, select "Line" in the Goto What? list.

    • Enter a "+" or "-" and a number of lines to move in the Line number field.

    • Click Goto.

  3. Optionally, select "Function" in the Goto What? list.

    • Select a function in the Function list.

    • Click Goto.

  4. Optionally, select "Comment" in the Goto What? list.

    • Select a comment in the Comment list.

    • Click Goto.

  5. Optionally, select "Bookmark" in the Goto What? list. A bookmark is a comment in your code that starts with //. For example //bookmark1.

    • Select a bookmark in the Bookmarks list.

    • Click Goto.

See Also